package com.houxm.jbapu;

import java.util.List;
import java.util.Set;

public class Table {

	private String dbName;
	private String tableName;
	private List<String> primaryKey = null;
	private Set<String> columnNames = null;
	
	public Table() {}
	public Table(String dbName, String tableName) {
		this.dbName = dbName;
		this.tableName = tableName;
	}
	public Table(String dbName, String tableName, List<String> primaryKey) {
		this.dbName = dbName;
		this.tableName = tableName;
		this.primaryKey = primaryKey;
	}
	
	public String getDbName() {
		return dbName;
	}
	public void setDbName(String dbName) {
		this.dbName = dbName;
	}
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public List<String> getPrimaryKey() {
		return primaryKey;
	}
	public void setPrimaryKey(List<String> primaryKey) {
		this.primaryKey = primaryKey;
	}
	public Set<String> getColumnNames() {
		return columnNames;
	}
	public void setColumnNames(Set<String> columnNames) {
		this.columnNames = columnNames;
	}
	public boolean containsColumn(String columnName) {
		return this.columnNames.contains(columnName);
	}
}
